home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 2.1 KB | 45 lines | [TEXT/GEOL] |
- Item forwarded by A33 to A34
-
- Item 7579347 19-April-90 03:28PDT
-
- From: D4727 Ghent Farm, Jesse Feiler,AST
-
- To: MACAPP.TECH$ MacApp Technical
-
- Sub: Bug: non-unique fIdentifier
-
- I don't know if this is a known bug or not…
-
- In MacApp 2.0ß9, TDialogView.DoOpen relies on the target's fIdentifier field
- being unique. In fact, views created programmatically (rather than from
- ViewEdit resources) are very likely to have non-unique fIdentifiers--since
- TView.IView sets fIdentifier to kNoIdentifier (' '). ViewEdit nicely numbers
- the views (VW01, VW02), so unless you deliberately change one of those unique
- identifiers, you're ok using views created from resources.
-
- What happens is that if you happen to have a non-unique view fIdentifier (like
- ' ') on a TDialogView's target which is a TEditText, the TEditText view is
- not selected on opening the window (since the FindSubView code may not pick up
- the correct subview), fTEView is left to be NIL, but the TDialogView's fTarget
- remains set to the TEditText view. THEN, when you try to click on the field,
- TEditText.DoMouseCommand blows up, since it assumes that if it is the target,
- fTEView is non-NIL.
-
- There are various possible solutions, including having TDialogView.DoOpen do
- some preventive checking (in debug mode only), or modifying
- TEditText.DoMouseCommand so that it correctly handles the fTEView = NIL case.
- (TEditText.DoKeyCommand handles this correctly, so that while you can't select
- the field with the mouse, entering it with the tab key works properly.)
-
- Either way, this is one of those nasties that manifests itself far away from
- the original source of the error. In addition, it may come and go during
- development because TDialogView.DoOpen will function correctly if the target
- TEditText view has a non-unique fIdentifier BUT is the first so-identified view
- in the subview list. (Not a rare occurrence -- we often set the target to the
- first field in the window, and we often create those views in order). So I pass
- on this saga in case it saves anyone else some time and/or grief.
-
- JF
-
-
-